package com.lkd.mapper;

import com.lkd.vo.VmVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VendingMachineMapper {

    @Select("select count(*) from tb_vending_machine where owner_id = #{id}")
    Integer countByPartnerId(Integer id);

    @Select("select count(*) from tb_vending_machine where node_id = #{nodeId}")
    Integer countByNodeId(Long id);

    @Select("select * from tb_vending_machine where node_id = #{nodeId}")
    List<VmVo> findByNodeId(Long nodeId);

}
